import request from '@/utils/request'

const api = {
  add: '/boss/budget/add',
  list: '/boss/budget/listByPage',
  export: '/boss/budget/export',
  detail: '/boss/budget/getDetail',
  review: '/boss/budget/review'

}

export function addBudget (parameter) {
  return request({
      url: api.add,
      method: 'post',
      data: parameter
  })
}

export function budgetList (parameter) {
  return request({
      url: api.list,
      method: 'post',
      data: parameter
  })
}

export function budgetReview (parameter) {
  return request({
      url: api.review,
      method: 'post',
      data: parameter
  })
}

export function budgetDetail (parameter) {
  return request({
      url: api.detail,
      method: 'post',
      data: parameter
  })
}

export function budgetExport (parameter) {
  return request({
      url: api.export,
      method: 'get',
      params: parameter,
      responseType: 'blob'
  })
}
